subroutine r2abij_t1ei_iabej(r2, t1, iabci, & 
               icore, fact)
!
use mod_size
use mod_ioff
use mod_orbit
use mod_iop 
implicit none
!
real*8, intent(in) :: fact
real*4, intent(in) :: r2(*)
real*4, intent(in) :: iabci(*)
!
real*4, intent(inout) :: t1(*), icore(*)
!
integer :: i, j, a, b, nsize
integer :: i0, i1, i2, i3, i4
integer, external :: idsymsoc 
real*8, external :: dnrm2
!this is to do r2(ab,ij) = r2(abij) + Pij*t1(ei)*iabci(ab,ej)
i0 = 1                 
i1 = i0 + nvvvo*isd
i2 = i1 + nvvoo*isd
i3 = i2 + nvvoo*isd  
i4 = i3 + nvvoo*isd
!
!==AAAA
!
call isymtrso(iabci(ioi5(1)), icore(i0), vrta, vrta, 0, 0, vrta, popa, 1, 1, 1)
call VpqrmVms_to_Vpqrs(icore(i0), t1(ifvo(1)), 1, 1, vrta, &
               vrta, vrta, 0, popa, popa, icore(i1), 1, 1.d0, 0.d0) 
!tmp(AB,JI)
call iassymso(icore(i1), icore(i0), 1, vrta, vrta, popa, popa, 0)
call axpyso(nioi31, -fact, icore(i0), 1, r2(ioi3(1)), 1)
!
!==BBBB
!
call isymtrso(iabci(ioi5(3)), icore(i0), vrtb, vrtb, 0, 0, vrtb, popb, 1, 1, 1)
call VpqrmVms_to_Vpqrs(icore(i0), t1(ifvo(2)), 1, 1, vrtb, &
               vrtb, vrtb, 0, popb, popb, icore(i1), 1, 1.d0, 0.d0) 
!tmp(AB,JI)
call iassymso(icore(i1), icore(i0), 1, vrtb, vrtb, popb, popb, 0)
call axpyso(nioi33, -fact, icore(i0), 1, r2(ioi3(3)), 1)
!
!==ABAB
!iabci(Ab,Ej)*t1(EI)-iabci(Ab,eI)*t1(ej)
!iabci(Ab,Ej)*t1(EI)+iabci(bA,eI)*t1(ej)
call isymtrso(iabci(ioi5(2)), icore(i0), vrta, vrtb, 1, 0, vrta, popb, 1, 1, 1)
call VpqrmVms_to_Vpqrs(icore(i0), t1(ifvo(1)), 1, 1, vrta, &
               vrta, vrtb, 1, popb, popa, icore(i1), 1, 1.d0, 0.d0) 
call isymtrso(icore(i1), icore(i0), vrta, vrtb, 1, 0, popb, popa, 1, 1, 1)
call axpyso(nioi32, fact, icore(i0), 1, r2(ioi3(2)), 1)
!
call isymtrso(iabci(ioi5(4)), icore(i0), vrtb, vrta, 1, 0, vrtb, popa, 1, 1, 1)
call VpqrmVms_to_Vpqrs(icore(i0), t1(ifvo(2)), 1, 1, vrtb, &
               vrtb, vrta, 1, popa, popb, icore(i1), 1, 1.d0, 0.d0) 
call isymtrso(icore(i1), icore(i0), vrtb, vrta, 1, 1, popa, popb, 1, 0, 1)
call axpyso(nioi32, fact, icore(i0), 1, r2(ioi3(2)), 1)

!
return
end
